package com.liveHere.www.dao;

import com.liveHere.www.po.Shop;
import com.liveHere.www.po.User;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author Mo312
 */
public interface ShopDao {
    //注册
    public abstract boolean register(Shop shop) throws Exception;

    //登录
    public abstract Shop login(String shopName, String shopPassword) throws Exception ;

    //更新商铺信息
    public abstract boolean updateShopInfo(Shop shop) throws Exception;

    //获取所有商铺
    public abstract ArrayList<Shop> getAllShops() throws Exception;

    //计算营业额
    public abstract double calculateIncome(int shopId) throws Exception;

    //获取待审核的商铺列表
    public abstract ArrayList<Shop> getPendingShops() throws SQLException;

    //审核通过店铺入驻申请
    public abstract boolean approveShop(int shopId) throws SQLException;

    //拒绝店铺入驻申请
    public abstract boolean rejectShop(int shopId) throws SQLException;

    //封禁店铺
    public abstract boolean banShop(int shopId) throws SQLException;

    //更新店铺收入
    public abstract void updateShopIncome(int shopId, double income) throws Exception;

    //按日期排序获取所有商铺
    public abstract ArrayList<Shop> getAllShopsOrderByDate() throws SQLException;

    //按销量排序获取所有商铺
    public abstract ArrayList<Shop> getAllShopsOrderBySales() throws SQLException;
}
